package com.shove.web.action;

import java.util.HashMap;
import java.util.Map;

import com.gofull.gateway.xwbank.util.XwBankSubmit;
import com.shove.util.UtilDate;
import com.sp2p.action.front.BaseFrontAction;
import com.sp2p.constants.IConstants;
import com.sp2p.entity.User;

public class XwBankAction extends BaseFrontAction {
	
	public String personalRegisterExpand() throws Exception {
		User user = (User) session().getAttribute(IConstants.SESSION_USER);
		if (user == null) {
			return "noLogin";
		}
		
		// 接口参数
		Map<String, String> reqData = new HashMap();
		reqData.put("platformUserNo", user.getId().toString());
		reqData.put("requestNo", XwBankSubmit.createRequestNo());
		reqData.put("idCardType", "PRC_ID");
		reqData.put("userRole", "INVESTOR");
		reqData.put("checkType", "LIMIT");
		reqData.put("redirectUrl", "http://www.gofull.com.cn");
		reqData.put("userLimitType", "ID_CARD_NO_UNIQUE");
		reqData.put("authList", "TENDER,REPAYMENT,CREDIT_ASSIGNMENT,WITHDRAW,RECHARGE,COMPENSATORY");
		
		// 必须添加的参数
		reqData.put("timestamp", UtilDate.getOrderNum());
		
		String html = XwBankSubmit.buildForm(reqData, "PERSONAL_REGISTER_EXPAND");
		sendHtml(html);
		return null;
	}

}
